﻿<UserControl x:Class="Starehe.Views.NewFeesPayment"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:helper ="clr-namespace:Helper;assembly=Starehe.Helper"
      mc:Ignorable="d" 
             Background="White"
      xmlns:Controls="clr-namespace:Helper.Controls;assembly=Helper"
      d:DesignHeight="600" d:DesignWidth="900">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Starehe;component/ModelsDataTemplates.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    
    <Grid>
        <TextBlock HorizontalAlignment="Left" Margin="20,20,0,0" Style="{DynamicResource Title}"  Text="Fees Payment" VerticalAlignment="Top"/>
        <TextBlock HorizontalAlignment="Left" Margin="40,80,0,0" Style="{DynamicResource Title0}" Text="Student" VerticalAlignment="Top"/>
        <TextBox HorizontalAlignment="Left" Height="23" Margin="117,130,0,0" VerticalAlignment="Top" Width="200"
                 Text="{Binding StudentID, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, Delay=100,
            ValidatesOnDataErrors=True}"/>
        <TextBlock HorizontalAlignment="Left" Margin="56,130,0,0" TextWrapping="Wrap" Text="Student ID" VerticalAlignment="Top"/>
        <TextBlock HorizontalAlignment="Left" Margin="40,195,0,0" Style="{DynamicResource Title0}" Text="Payment" VerticalAlignment="Top"/>
        <TextBlock HorizontalAlignment="Left" Margin="66,245,0,0" TextWrapping="Wrap" Text="Payment" VerticalAlignment="Top"/>
        <TextBox HorizontalAlignment="Left" Height="23" Margin="117,245,0,0" VerticalAlignment="Top" Width="150"
                 DataContext="{Binding CurrentPayment}"
                 Text="{Binding AmountPaid, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
        <ListBox Margin="350,109,30,50" DataContext="{Binding}" ItemsSource="{Binding RecentPayments}"
                 ItemTemplate="{StaticResource FeePaymentModel}" />
        <Button Content="_Save" HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" Width="75"
                Command="{Binding SaveCommand}"/>
        <TextBlock HorizontalAlignment="Left" Margin="350,80,0,0" Style="{DynamicResource Title0}" Text="Recent Payments" VerticalAlignment="Top"/>
        
    </Grid>
</UserControl>
